{template header}

    {template sidebar}

    <!-- artile begin -->
    <div class="article">

        {template title}
    <!--{if $a == 'index'}-->
        <form class="form-search" action="{$this->url($c, null, $this->get())}">
            <table>
                <tr><td class="td1" width="20%">供货商名称：</td>
                    <td>

                        <div class="input-append">
                            <input type="text" name="key" class="span2 search-query" placeholder="请输入商品名称" />
                            <button type="button" class="btn search">搜索</button>
                        </div>
                    </td >
            </table>
            </tr>
        </form>
        <table>
            <tr>
                <th width="5%"><input type="checkbox" class="all" /></th>
                <th width="15%">供货商名称</th>
                <th width="20%">姓名</th>
                <th width="15%">职务</th>
                <th width="15%">电话</th>
                <th width="15%">操作</th>
            </tr>
        <!--{if $result}-->
            <!--{loop $result $v}-->
            <tr>
                <td><input type="checkbox" name="id" value="{$v['id']}"/></td>
                <td>{$v['supplierName']}</td>
                <td>{$v['name']}</td>
                <td>{$v['position']}</td>
                <td>{$v['telephone']}</td>
                <td class="operate">
                    <a href="{$this->url($c,'edit',array('id'=>$v['id']))}">编辑</a>
                    <a title="删除" class="del" href="{$this->url($c,'del',array('id'=>$v['id']))}">删除</a>
                </td>
            </tr>
            <!--{/loop}-->
        <!--{else}-->
            <tr>
                <td colspan="6">没有记录!</td>
            </tr>
        <!--{/if}-->

        <!--{if $pager}-->
            <!--分页开始-->
            <tr>
                <td colspan="6">
                    <div class="page">{$pager}</div>
                </td>
            </tr>
            <!--分页结束-->
        <!--{/if}-->
            
        </table>

    <!--{/if}-->
    <!--{if  $a == 'add' || $a == 'edit'}-->
        <form method="post" action="{$this->url($c, 'save', array('id' => $result['id']))}">
            <table>
                <tr>
                    <td class="td1" width="25%">供货商名称：</td>
                    <td class="td2">
                        <input type="text" name="supplierName" placeholder="请输入供货商名称" class="required" value="{$result['supplierName']}"/>
                    </td>
                </tr>
                <tr>
                    <td class="td1" width="25%">姓名：</td>
                    <td class="td2">
                        <input type="text" name="name" placeholder="请输入姓名" class="required" value="{$a == 'edit' ? $result['name'] : ''}"/>
                    </td>
                </tr>
                <tr>
                    <td class="td1">职务：</td>
                    <td class="td2">
                        <input type="text" name="position" placeholder="请输入职务" class="required" value="{$a == 'edit' ? $result['position'] : ''}"/>
                    </td>
                </tr>
                <tr>
                    <td class="td1">电话：</td>
                    <td class="td2">
                        <input type="text" name="mobile" placeholder="请输入电话" class="required" value="{$a == 'edit' ? $result['mobile'] : ''}"/>
                    </td>
                </tr>
                <tr>
                    <td class="td1">固定电话：</td>
                    <td class="td2">
                        <input type="text" name="telephone" placeholder="请输入固定电话" class="required"  value="{$a == 'edit' ? $result['telephone'] : ''}"/>
                    </td>
                </tr>
                <tr>
                    <td class="td1">QQ：</td>
                    <td class="td2">
                        <input type="text" name="qq" placeholder="请输入QQ" class="required" value="{$a == 'edit' ? $result['qq'] : ''}"/>
                    </td>
                </tr>
                <tr>
                    <td class="td1">Email：</td>
                    <td class="td2">
                        <input type="text" name="email" placeholder="请输入Email" class="required" value="{$a == 'edit' ? $result['email'] : ''}"/>
                    </td>
                </tr>
                <tr>
                    <th colspan="2" class="td4">
                        <a title="保存{$this->name}" class="btn btn-success save" href="{$this->url($c)}">保 存</a>
                    </th>
                </tr>
            </table>
        </form>
        <!--{/if}-->
    </div>
    <!-- artile end -->
{template footer}